<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>网站模块-网站配置</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="${s.base}/js/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="${s.base}/css/base/base.css" media="all" /></head>
	<style type="text/css">
		.layui-form-label{    width: 120px;}
		.layui-input-block {
			margin-left: 150px;
			min-height: 36px;
		}
	</style>
<body class="childrenBody">
<form class="layui-form">
	<#if webConfig.id??>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;配置id</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" value="${webConfig.id}" readonly/></div>
	</div>
	</#if>
	<input type="hidden" id="id" name="id" value="${webConfig.id}" />
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;网站名称</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="name" value="${webConfig.name}" placeholder="请输入网站名称" lay-verify="required" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;网站地址</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="siteUrl" value="${webConfig.siteUrl}" placeholder="请输入网站地址" lay-verify="required" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;网站风格</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="siteStyle" value="${webConfig.siteStyle}" placeholder="请输入网站风格" lay-verify="required" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;版权信息</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="copyright" value="${webConfig.copyright}" placeholder="请输入版权信息" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;logo</label>
		<!--单图片开始-->
		<div class="layui-input-block cy-uploadpic-ctn" id="coverImage"  style=" float:left;margin:10px 0!important;position:relative; width: 90px; height: 90px;">
		</div>
		<!--单图片结束-->
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;网站关键字</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="seoKeyword" value="${webConfig.seoKeyword}" placeholder="请输入网站关键字" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;网站描述</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="description" value="${webConfig.description}" placeholder="请输入网站描述"  autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red">*</span>&nbsp;&nbsp;网站备案号</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="siteNumber" value="${webConfig.siteNumber}" placeholder="请输入网站备案号" lay-verify="required" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;联系电话</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="telephone" value="${webConfig.telephone}" placeholder="请输入联系电话" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;售后电话</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="servicePhone" value="${webConfig.servicePhone}" placeholder="请输入售后电话" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;官方微信</label>
		<!--单图片开始-->
		<div class="layui-input-block cy-uploadpic-ctn" id="wechat"  style=" float:left;margin:10px 0!important;position:relative; width: 90px; height: 90px;">
		</div>
		<!--单图片结束-->
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;官方qq</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="qq" value="${webConfig.qq}" placeholder="请输入官方qq" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;邮箱</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="email" value="${webConfig.email}" placeholder="请输入邮箱" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">
			<span class="red"></span>&nbsp;&nbsp;地址</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="address" value="${webConfig.address}" placeholder="请输入地址" autocomplete="off" /></div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<div class="layui-input-block">
			<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="submitBtn">确定</button>
			<button type="reset" class="layui-btn layui-btn-sm layui-btn-primary cancel">取消</button></div>
	</div>
</form>
<script type="text/javascript" src="${s.base}/js/layui/layui.js"></script>
<script type="text/javascript" src="${s.base}/js/base/base.js"></script>
<script type="text/javascript">layui.use(['form', 'jquery', 'baseUtil', 'pageUtil','dialogUtil','fileUtil'],
    function() {
        var form = layui.form,
            $ = layui.jquery,
            baseUtil = layui.baseUtil,
            fileUtil = layui.fileUtil,
            dialogUtil = layui.dialogUtil,
            pageUtil = layui.pageUtil;
        //单图片上传
        fileUtil.uploadImageNoSave('coverImage',"web/config","${webConfig.coverImage}");
        //单图片上传
        fileUtil.uploadImageNoSave('wechat',"web/config","${webConfig.wechat}");
        form.on('submit(submitBtn)',
            function(data) {
                baseUtil.postMethodResult("/webConfig/addOrUpdate", data.field,
                    function(result) {
                        dialogUtil.alert("修改成功",function () {
							window.location.reload();
                        });
                    });
                return false;
            });
    });</script>
</body>

</html>